<%-- 
    Document   : adminListAllExercises
    Created on : 07-mar-2012, 16:55:14
    Author     : Patricia
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>


        <h1>ADMINISTRADOR</h1>

       

        <table align="center">
            <tr>
                <td colspan="3">
                    <html:form action="/ListPorTemaExerc">
                        <bean:message key="admin.buscar"/>

                        <html:select property="tema">
                            <logic:present name="temas" >
                                <logic:iterate id="temaEjercicio" name="temas">
                                    <html:option value="${temaEjercicio.idtema}">${temaEjercicio.tema}</html:option>  
                                </logic:iterate>
                            </logic:present>                              
                        </html:select>
                        <html:submit><bean:message key="admin.submit"/></html:submit> 
                    </html:form>
                    <hr/>
                </td>
            </tr>
            <tr bgcolor="yellow">
                <td><b>Ejericio</b></td>
                <td colspan="2"><b>Opciones</b></td>
            </tr>

            <logic:iterate  name="ejerlistAdmin"  id="ej">
                <tr>
                    <td> ${ej.titulo}</td>
                    <td> <html:link href="DeleteExerciseAdmin.do?idej=${ej.idejercicio}">Reportar</html:link></td>
                    <td><html:link href="ListComments.do?idej=${ej.idejercicio}">Ver comentarios</html:link></td>
                </tr>
            </logic:iterate>
            <tr align="center">
                <td colspan="3" bgcolor="yellow"><html:link action="/ListAllExercises.do">Listar Todos los Ejercicios</html:link></td>
            </tr>
            <tr align="center">
                <td colspan="3"><html:link action="/pagPrincipal.do">Volver</html:link></td>           </tr>
           
        </table>

    </body>
</html>
